package cn.dnui_cr503.dnuifood_16110100503.model;

import cn.dnui_cr503.dnuifood_16110100503.iface.Buyiface;
import cn.dnui_cr503.dnuifood_16110100503.listener.OnRetrofitListener;
import cn.dnui_cr503.dnuifood_16110100503.service.BuyService;
import retrofit2.Call;

/**
 * Created by chengrui on 2018/11/25.
 */

public class BuyModel extends BaseModel implements Buyiface{
    private BuyService service;

    public BuyModel(){
        super();
        service = retrofit.create(BuyService.class);
    }
    @Override
    public void insertOrder(String user_id, String food_id, String num, String sum, String suggesttime, String address, OnRetrofitListener listener) {
        Call call = service.insertOrder(user_id,food_id,num,sum,suggesttime,address);
        bindCallback(call,listener,1);
    }
}
